<?php
include 'includes/application_top.inc';
 

$select =  "SELECT useragent, COUNT(*) AS `user_count` from track_url where `datetime` >= DATE_SUB(CURDATE(), INTERVAL 1 DAY) GROUP BY useragent ORDER BY t_id DESC";
 
$result = mysql_query($select);

$rows = array();
while($r = mysql_fetch_array($result)) {
	$row[0] = $r[0];
	$row[1] = $r[1];
	$datas =array_push($rows,$row);
}
 
print json_encode($rows, JSON_NUMERIC_CHECK);

mysql_close($con);
?> 
